public class Exception_Test2 {
    public static void main(String[] args) {
        try {
            SaveAge(110);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void SaveAge(int age){
        if (age > 0 && age < 100){
            System.out.println("年龄保存成功：" + age);
        }else {
            throw new AgeRunTimeException("age Error,age = " + age);
        }
    }
}
